<?

if($Db->connect()){

  if($_SESSION["modify_mode"] == "Y"){


  }else{


  }
  /**
   * @todo, user model id in the query
   */
  echo  "<table border='1' class='dedeq'>\n".
        "<tr>\n".
        "<th> No    </th>\n".
        "<th> Drop  </th>\n".
        "<th> From  </th>\n".
        "<th> To    </th>\n".
        "<th> Qty   </th>\n".
        "</tr>\n";

  for($iRow = 0; $iRow < $_SESSION["init_num"]; $iRow++){

    $propFrom = $GJs->jsOnFocus("GMisc.setYellow2(this);
                                 Ajax.unitFrom(\"modelEnt\",
                                               \"fromEnt[".$iRow."]\")").

                $GJs->jsOnBlur ("GMisc.setWhite2(this);");

    echo  "<tr>\n".

            "<td> ".($iRow + 1)." </td>\n".

            "<td> ".$GHtml->formCheckBox("dropBox[]",
                                         ($iRow + 1),
                                         $propDropBox)." </td>\n".

            "<td> ".$GHtml->formInput("fromEnt[".$iRow."]",
                                      $_POST["fromEnt"][$iRow],
                                      $propFrom)." </td>\n".

            "<td> ".$GHtml->formInput("toEnt[".$iRow."]",
                                      $_POST["toEnt"][$iRow],
                                      $Misc->stdProperties())." </td>\n".

            "<td> ".$GHtml->formInput("qtyEnt[".$iRow."]",
                                      $_POST["qtyEnt"][$iRow],
                                      $Misc->stdProperties().
                                      $Misc->stdNumStyle(5))." </td>\n".

          "</tr>\n";
  }

  echo  "</table><br/>\n";

  echo  $GHtml->formInputButton( "Entry-data",
                                 "entry",
                                 "Entry-data",
                                 $stlButton).
        $GHtml->formInputButton( "Add-row",
                                 "addrow",
                                 "Add-row",
                                 $stlButton).
  			$GHtml->formInputButton( "Drop-row",
                                 "droprow",
                                 "Drop-row",
                                 $stlButton).
      	"</form>\n ".
      	"</body>\n";

  $Db->dc();
}else{

  $Misc->usrDie(_DB_CONN_ERROR);
}

?>